package cn.maxmc.murderaddons.task

import cn.maxmc.murderaddons.machine.BaseMachine
import org.bukkit.entity.Player

class ArenaPlayerTask(val player: Player, val tasks: List<BaseMachine>) {
    fun getProcess(): Double {
        val total = tasks.size
        var finish = 0

        tasks.forEach {
            if(it.isFinish(player)) {
                finish++
            }
        }

        return (finish.toDouble() / total.toDouble())
    }
}